package com.mvvm.ktnet.http.rxhttpparser

import okhttp3.Response
import rxhttp.wrapper.annotations.NonNull
import rxhttp.wrapper.exception.ParseException

/**
 *
 * @ProjectName:    JetPackViewModel
 * @Package:        com.android.me.alex.http.response
 * @ClassName:      CustomParseException
 * @Description:     java类作用描述
 * @Author:         Alex
 * @CreateDate:     2020/8/4 11:56
 * @UpdateUser:     更新者：
 * @UpdateDate:     2020/8/4 11:56
 * @UpdateRemark:   更新说明：
 * @Version:        1.0
 */
open class CustomParseException(
    @NonNull code: String,
    message: String? = "",
    response: Response,
    result: String
) :
    ParseException(code, message, response, result) {

    override fun toString(): String {
        return "${javaClass.name} : Method= $requestMethod Code= $errorCode\n\n $requestUrl\n\n $responseHeaders\n message = $message\n result = $requestResult"
    }
}